from . import bp_apiorder
from db_connect import ConnMysqlSlave
from db_connect import ConnMysql
import aiomysql
from .methods import Order
from sanic import response
from db_connect.datetimes import DateEncoder


@bp_apiorder.route('/history')
async def select_hisitory_info(request):

    form_info = request.args

    user_id = form_info.get('user_id')
    merchat_id = form_info.get('merchat_id')


    result = await Order(user_id, merchat_id).result()


    return response.json(result)